package org.crazyit.activiti_d1._5_AddString;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.DeploymentBuilder;

public class AddString {

    public static void main(String[] args) {

        //1. 创建流程引擎
        ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();

        //2. 得到流程存储服务对象
        RepositoryService repositoryService = engine.getRepositoryService();

        //3. 创建DeploymentBuilder 实例
        DeploymentBuilder builder = repositoryService.createDeployment();

        //4. 添加classpath 下的资源
        builder.addString("str","hello, world!");

        //5. 执行部署 (写入数据库中)
        builder.deploy();

    }

}
